package com.example.JcGQS.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.JcGQS.pojo.entity.Purchase;

import com.example.JcGQS.pojo.vo.PurchaseVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.javassist.bytecode.annotation.IntegerMemberValue;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 采购信息Mapper
 * @author 末日
 * @date 2023/11/21
 */
@Component
public interface PurchaseMapper extends BaseMapper<Purchase> {
    /**
     * @param userId
     * @return
     */
//    @Select("SELECT p.purchase_id,p.purchase_order,p.purchase_goods_id,gs.goods_number," +
//            "gc.category_name,gs.goods_name,gs.goods_specification,gs.goods_model,gs.goods_unit," +
//            "p.purchase_project_id,p.purchase_state,p.purchase_remark,p.purchase_submit_quantity," +
//            "p.purchase_pay_quantily,p.purchase_unitprice,p.purchase_totall_price,p.purchase_supplier_id," +
//            "p.purchase_order_number,p.purchase_logistics_number,p.purchase_invoice_id,i.contract_number," +
//            "i.invoice_number,i.invoices_rate,i.invoices_taxes,i.invoices_type,i.invoice_state," +
//            "p.purchase_submit_user_id,p.purchase_submit_time,p.purchase_review_time,p.purchase_purchase_user_id," +
//            "p.purchase_purchase_time,p.purchase_create_time,p.purchase_update_time" +
//            " FROM purchase p " +
//
//            "Left Join goods gs on p.purchase_goods_id = gs.goods_id " +
//            "left join goods_category gc on gs.category_id = gc.category_id " +
//            "left join Invoice i on p.purchase_invoice_id = i.invoice_id " +
//            "WHERE purchase_submit_user_id = #{userId} " +
//            "AND purchase_delete = 0 " +
//            "AND (purchase_state = #{reviewedValue} OR purchase_state = #{haveOrderValue} OR " +
//            "purchase_state = #{purchasingValue} OR purchase_state = #{purchaseSuccessValue}) " +
//            "ORDER BY purchase_id ASC")
    List<PurchaseVo> getApplicantReviewedingPurchase(String columnCode,@Param("delete") String delete, @Param("userId") Integer userId,@Param("list") List<String> list);


    List<PurchaseVo> getApplicantReviewedingPurchasess(@Param("delete") String delete, @Param("userId") Integer userId,@Param("list") List<String> list);

    List<PurchaseVo> getApplicantReviewedingPurchasesing(@Param("delete") String delete, @Param("list") List<String> list);

    List<PurchaseVo> getwarehousemanPurchaseFailedPurchase(@Param("list") List<String> list);


    List<PurchaseVo> getApplicantReviewedingPurchas(String columnCode, @Param("userId") Integer userId,@Param("list") List<String> list);


    List<PurchaseVo> getApplicantReviewedingPurchases( @Param("userId") Integer userId,@Param("list") List<String> list);


   // List<PurchaseVo> a(String columnCode, @Param("userId") Integer userId,@Param("valueQo") ValueQo valueQo);

}

